/*


 */
package com.huike.web.controller.runner;

import com.huike.clues.service.ITbActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @ClassName Runner
 * @Description TODO
 * @Author Rain
 * @Date 2022/6/8 16:52
 * @Version 1.0
 */
@Component
public class Runner implements CommandLineRunner {
    @Autowired
    private ITbActivityService activityService;

    @Override
    public void run(String... args) throws Exception {
        try{
            //加载所有活动code到缓存
            activityService.loadAllActivityCode();
        }catch (Exception ex){
            ex.printStackTrace();
        }
    }
}
